package com.pureut.order.controller;

import com.pureut.common.core.domain.R;
import com.pureut.common.core.web.controller.BaseController;
import com.pureut.common.core.web.domain.AjaxResult;
import com.pureut.common.log.annotation.Log;
import com.pureut.common.log.enums.BusinessType;
import com.pureut.common.security.annotation.RequiresPermissions;
import com.pureut.order.service.CustomerComplaintsSolutionService;
import com.pureut.order.vo.CustomerComplaintsSolutionVo;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/***
 *
 * Author:C
 * Date:2022/11/30 14:08
 * @DESC
 */
@RestController
@RequestMapping("/customer-complaints-solution")
public class CustomerComplaintsSolutionController extends BaseController {

    @Resource
    CustomerComplaintsSolutionService customerComplaintsSolutionService;

    /**
     * 上传解决方案
     */
    @RequiresPermissions("order:sale:complaints:upSolution")
    @Log(title = "上传解决方案", businessType = BusinessType.UPDATE)
    @PostMapping("/upload")
    public AjaxResult upload(@Validated @RequestBody CustomerComplaintsSolutionVo customerComplaintsSolutionVo) {
        return toAjax(customerComplaintsSolutionService.upload(customerComplaintsSolutionVo));
    }
}
